package com.tcs.test.designmodel.singleion;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 线程不安全的
* @Title: Singleion1.java
* @Package com.tcs.test.designmodel.singleion
* @author 神经刀
* @date 2018年11月19日
* @version V1.0
 */
public class Singleion1 {
	
	private final Logger logger = LoggerFactory.getLogger(Singleion1.class);

	private static Singleion1 singleion1;
	
	private Singleion1() {
		logger.info("init class ");
	};
	
	public static synchronized Singleion1 getSingleion1() {
		if (null == singleion1) {
			singleion1 = new Singleion1();
		}
		return singleion1;
	}
}